Integrand size = 21, antiderivative size = 175 \[ \int (a+b \sec (c+d x))^2 \sin ^6(c+d x) \, dx=\frac {5}{16} \left (a^2-6 b^2\right ) x+\frac {2 a b \text {arctanh}(\sin (c+d x))}{d}-\frac {2 a b \sin (c+d x)}{d}-\frac {\left (11 a^2-18 b^2\right ) \cos (c+d x) \sin (c+d x)}{16 d}+\frac {\left (13 a^2-6 b^2\right ) \cos ^3(c+d x) \sin (c+d x)}{24 d}-\frac {a^2 \cos ^5(c+d x) \sin (c+d x)}{6 d}-\frac {2 a b \sin ^3(c+d x)}{3 d}-\frac {2 a b \sin ^5(c+d x)}{5 d}+\frac {b^2 \tan (c+d x)}{d} \]
[Out]
Time = 0.56 (sec) , antiderivative size = 175, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.476, Rules used = {3957, 2990, 2672, 308, 212, 466, 1828, 1171, 396, 209} \[ \int (a+b \sec (c+d x))^2 \sin ^6(c+d x) \, dx=\frac {\left (13 a^2-6 b^2\right ) \sin (c+d x) \cos ^3(c+d x)}{24 d}-\frac {\left (11 a^2-18 b^2\right ) \sin (c+d x) \cos (c+d x)}{16 d}+\frac {5}{16} x \left (a^2-6 b^2\right )-\frac {a^2 \sin (c+d x) \cos ^5(c+d x)}{6 d}+\frac {2 a b \text {arctanh}(\sin (c+d x))}{d}-\frac {2 a b \sin ^5(c+d x)}{5 d}-\frac {2 a b \sin ^3(c+d x)}{3 d}-\frac {2 a b \sin (c+d x)}{d}+\frac {b^2 \tan (c+d x)}{d} \]
[In]
[Out]
Rule 209
Rule 212
Rule 308
Rule 396
Rule 466
Rule 1171
Rule 1828
Rule 2672
Rule 2990
Rule 3957
Rubi steps \begin{align*} \text {integral}& = \int (-b-a \cos (c+d x))^2 \sin ^4(c+d x) \tan ^2(c+d x) \, dx \\ & = (2 a b) \int \sin ^5(c+d x) \tan (c+d x) \, dx+\int \left (b^2+a^2 \cos ^2(c+d x)\right ) \sin ^4(c+d x) \tan ^2(c+d x) \, dx \\ & = \frac {\text {Subst}\left (\int \frac {x^6 \left (a^2+b^2+b^2 x^2\right )}{\left (1+x^2\right )^4} \, dx,x,\tan (c+d x)\right )}{d}+\frac {(2 a b) \text {Subst}\left (\int \frac {x^6}{1-x^2} \, dx,x,\sin (c+d x)\right )}{d} \\ & = -\frac {a^2 \cos ^5(c+d x) \sin (c+d x)}{6 d}-\frac {\text {Subst}\left (\int \frac {-a^2+6 a^2 x^2-6 a^2 x^4-6 b^2 x^6}{\left (1+x^2\right )^3} \, dx,x,\tan (c+d x)\right )}{6 d}+\frac {(2 a b) \text {Subst}\left (\int \left (-1-x^2-x^4+\frac {1}{1-x^2}\right ) \, dx,x,\sin (c+d x)\right )}{d} \\ & = -\frac {2 a b \sin (c+d x)}{d}+\frac {\left (13 a^2-6 b^2\right ) \cos ^3(c+d x) \sin (c+d x)}{24 d}-\frac {a^2 \cos ^5(c+d x) \sin (c+d x)}{6 d}-\frac {2 a b \sin ^3(c+d x)}{3 d}-\frac {2 a b \sin ^5(c+d x)}{5 d}+\frac {\text {Subst}\left (\int \frac {-3 \left (3 a^2-2 b^2\right )+24 \left (a^2-b^2\right ) x^2+24 b^2 x^4}{\left (1+x^2\right )^2} \, dx,x,\tan (c+d x)\right )}{24 d}+\frac {(2 a b) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sin (c+d x)\right )}{d} \\ & = \frac {2 a b \text {arctanh}(\sin (c+d x))}{d}-\frac {2 a b \sin (c+d x)}{d}-\frac {\left (11 a^2-18 b^2\right ) \cos (c+d x) \sin (c+d x)}{16 d}+\frac {\left (13 a^2-6 b^2\right ) \cos ^3(c+d x) \sin (c+d x)}{24 d}-\frac {a^2 \cos ^5(c+d x) \sin (c+d x)}{6 d}-\frac {2 a b \sin ^3(c+d x)}{3 d}-\frac {2 a b \sin ^5(c+d x)}{5 d}-\frac {\text {Subst}\left (\int \frac {-3 \left (5 a^2-14 b^2\right )-48 b^2 x^2}{1+x^2} \, dx,x,\tan (c+d x)\right )}{48 d} \\ & = \frac {2 a b \text {arctanh}(\sin (c+d x))}{d}-\frac {2 a b \sin (c+d x)}{d}-\frac {\left (11 a^2-18 b^2\right ) \cos (c+d x) \sin (c+d x)}{16 d}+\frac {\left (13 a^2-6 b^2\right ) \cos ^3(c+d x) \sin (c+d x)}{24 d}-\frac {a^2 \cos ^5(c+d x) \sin (c+d x)}{6 d}-\frac {2 a b \sin ^3(c+d x)}{3 d}-\frac {2 a b \sin ^5(c+d x)}{5 d}+\frac {b^2 \tan (c+d x)}{d}+\frac {\left (5 \left (a^2-6 b^2\right )\right ) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (c+d x)\right )}{16 d} \\ & = \frac {5}{16} \left (a^2-6 b^2\right ) x+\frac {2 a b \text {arctanh}(\sin (c+d x))}{d}-\frac {2 a b \sin (c+d x)}{d}-\frac {\left (11 a^2-18 b^2\right ) \cos (c+d x) \sin (c+d x)}{16 d}+\frac {\left (13 a^2-6 b^2\right ) \cos ^3(c+d x) \sin (c+d x)}{24 d}-\frac {a^2 \cos ^5(c+d x) \sin (c+d x)}{6 d}-\frac {2 a b \sin ^3(c+d x)}{3 d}-\frac {2 a b \sin ^5(c+d x)}{5 d}+\frac {b^2 \tan (c+d x)}{d} \\ \end{align*}
Time = 2.14 (sec) , antiderivative size = 193, normalized size of antiderivative = 1.10 \[ \int (a+b \sec (c+d x))^2 \sin ^6(c+d x) \, dx=\frac {60 \left (5 \left (a^2-6 b^2\right ) (c+d x)-32 a b \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+32 a b \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )-2128 a b \sin (c+d x)+\left (-185 a^2+1410 b^2-5 \left (29 a^2-84 b^2\right ) \cos (2 (c+d x))+232 a b \cos (3 (c+d x))+35 a^2 \cos (4 (c+d x))-30 b^2 \cos (4 (c+d x))-24 a b \cos (5 (c+d x))-5 a^2 \cos (6 (c+d x))\right ) \tan (c+d x)}{960 d} \]
[In]
[Out]
Time = 2.14 (sec) , antiderivative size = 163, normalized size of antiderivative = 0.93
method | result | size |
derivativedivides | \(\frac {a^{2} \left (-\frac {\left (\sin \left (d x +c \right )^{5}+\frac {5 \sin \left (d x +c \right )^{3}}{4}+\frac {15 \sin \left (d x +c \right )}{8}\right ) \cos \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )+2 a b \left (-\frac {\sin \left (d x +c \right )^{5}}{5}-\frac {\sin \left (d x +c \right )^{3}}{3}-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+b^{2} \left (\frac {\sin \left (d x +c \right )^{7}}{\cos \left (d x +c \right )}+\left (\sin \left (d x +c \right )^{5}+\frac {5 \sin \left (d x +c \right )^{3}}{4}+\frac {15 \sin \left (d x +c \right )}{8}\right ) \cos \left (d x +c \right )-\frac {15 d x}{8}-\frac {15 c}{8}\right )}{d}\) | \(163\) |
default | \(\frac {a^{2} \left (-\frac {\left (\sin \left (d x +c \right )^{5}+\frac {5 \sin \left (d x +c \right )^{3}}{4}+\frac {15 \sin \left (d x +c \right )}{8}\right ) \cos \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )+2 a b \left (-\frac {\sin \left (d x +c \right )^{5}}{5}-\frac {\sin \left (d x +c \right )^{3}}{3}-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )+b^{2} \left (\frac {\sin \left (d x +c \right )^{7}}{\cos \left (d x +c \right )}+\left (\sin \left (d x +c \right )^{5}+\frac {5 \sin \left (d x +c \right )^{3}}{4}+\frac {15 \sin \left (d x +c \right )}{8}\right ) \cos \left (d x +c \right )-\frac {15 d x}{8}-\frac {15 c}{8}\right )}{d}\) | \(163\) |
parts | \(\frac {a^{2} \left (-\frac {\left (\sin \left (d x +c \right )^{5}+\frac {5 \sin \left (d x +c \right )^{3}}{4}+\frac {15 \sin \left (d x +c \right )}{8}\right ) \cos \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )}{d}+\frac {b^{2} \left (\frac {\sin \left (d x +c \right )^{7}}{\cos \left (d x +c \right )}+\left (\sin \left (d x +c \right )^{5}+\frac {5 \sin \left (d x +c \right )^{3}}{4}+\frac {15 \sin \left (d x +c \right )}{8}\right ) \cos \left (d x +c \right )-\frac {15 d x}{8}-\frac {15 c}{8}\right )}{d}+\frac {2 a b \left (-\frac {\sin \left (d x +c \right )^{5}}{5}-\frac {\sin \left (d x +c \right )^{3}}{3}-\sin \left (d x +c \right )+\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )\right )}{d}\) | \(168\) |
parallelrisch | \(\frac {-3840 a b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \cos \left (d x +c \right )+3840 a b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \cos \left (d x +c \right )+\left (-180 a^{2}+450 b^{2}\right ) \sin \left (3 d x +3 c \right )+\left (40 a^{2}-30 b^{2}\right ) \sin \left (5 d x +5 c \right )-2360 a b \sin \left (2 d x +2 c \right )+256 a b \sin \left (4 d x +4 c \right )-24 a b \sin \left (6 d x +6 c \right )-5 a^{2} \sin \left (7 d x +7 c \right )+600 d x \left (a^{2}-6 b^{2}\right ) \cos \left (d x +c \right )+\left (-225 a^{2}+2400 b^{2}\right ) \sin \left (d x +c \right )}{1920 d \cos \left (d x +c \right )}\) | \(191\) |
risch | \(\frac {5 a^{2} x}{16}-\frac {15 b^{2} x}{8}+\frac {i {\mathrm e}^{-2 i \left (d x +c \right )} b^{2}}{4 d}-\frac {15 i a^{2} {\mathrm e}^{-2 i \left (d x +c \right )}}{128 d}+\frac {11 i a b \,{\mathrm e}^{i \left (d x +c \right )}}{8 d}-\frac {i {\mathrm e}^{2 i \left (d x +c \right )} b^{2}}{4 d}+\frac {15 i a^{2} {\mathrm e}^{2 i \left (d x +c \right )}}{128 d}-\frac {11 i a b \,{\mathrm e}^{-i \left (d x +c \right )}}{8 d}+\frac {2 i b^{2}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}+\frac {2 a b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d}-\frac {2 a b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{d}-\frac {a^{2} \sin \left (6 d x +6 c \right )}{192 d}-\frac {a b \sin \left (5 d x +5 c \right )}{40 d}+\frac {3 a^{2} \sin \left (4 d x +4 c \right )}{64 d}-\frac {\sin \left (4 d x +4 c \right ) b^{2}}{32 d}+\frac {7 a b \sin \left (3 d x +3 c \right )}{24 d}\) | \(265\) |
norman | \(\frac {\left (-\frac {5 a^{2}}{16}+\frac {15 b^{2}}{8}\right ) x +\left (-\frac {45 a^{2}}{16}+\frac {135 b^{2}}{8}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (-\frac {25 a^{2}}{16}+\frac {75 b^{2}}{8}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (-\frac {25 a^{2}}{16}+\frac {75 b^{2}}{8}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\left (\frac {5 a^{2}}{16}-\frac {15 b^{2}}{8}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{14}+\left (\frac {25 a^{2}}{16}-\frac {75 b^{2}}{8}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\left (\frac {25 a^{2}}{16}-\frac {75 b^{2}}{8}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}+\left (\frac {45 a^{2}}{16}-\frac {135 b^{2}}{8}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}-\frac {\left (33 a^{2}+58 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{2 d}+\frac {\left (5 a^{2}-32 a b -30 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{13}}{8 d}+\frac {\left (5 a^{2}+32 a b -30 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d}+\frac {\left (35 a^{2}-256 a b -210 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{12 d}+\frac {\left (35 a^{2}+256 a b -210 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{12 d}+\frac {\left (565 a^{2}-5216 a b -3390 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{120 d}+\frac {\left (565 a^{2}+5216 a b -3390 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{120 d}}{\left (-1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right ) \left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{6}}-\frac {2 a b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{d}+\frac {2 a b \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d}\) | \(464\) |
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 176, normalized size of antiderivative = 1.01 \[ \int (a+b \sec (c+d x))^2 \sin ^6(c+d x) \, dx=\frac {75 \, {\left (a^{2} - 6 \, b^{2}\right )} d x \cos \left (d x + c\right ) + 240 \, a b \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) - 240 \, a b \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) - {\left (40 \, a^{2} \cos \left (d x + c\right )^{6} + 96 \, a b \cos \left (d x + c\right )^{5} - 352 \, a b \cos \left (d x + c\right )^{3} - 10 \, {\left (13 \, a^{2} - 6 \, b^{2}\right )} \cos \left (d x + c\right )^{4} + 736 \, a b \cos \left (d x + c\right ) + 15 \, {\left (11 \, a^{2} - 18 \, b^{2}\right )} \cos \left (d x + c\right )^{2} - 240 \, b^{2}\right )} \sin \left (d x + c\right )}{240 \, d \cos \left (d x + c\right )} \]
[In]
[Out]
Timed out. \[ \int (a+b \sec (c+d x))^2 \sin ^6(c+d x) \, dx=\text {Timed out} \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 173, normalized size of antiderivative = 0.99 \[ \int (a+b \sec (c+d x))^2 \sin ^6(c+d x) \, dx=\frac {5 \, {\left (4 \, \sin \left (2 \, d x + 2 \, c\right )^{3} + 60 \, d x + 60 \, c + 9 \, \sin \left (4 \, d x + 4 \, c\right ) - 48 \, \sin \left (2 \, d x + 2 \, c\right )\right )} a^{2} - 64 \, {\left (6 \, \sin \left (d x + c\right )^{5} + 10 \, \sin \left (d x + c\right )^{3} - 15 \, \log \left (\sin \left (d x + c\right ) + 1\right ) + 15 \, \log \left (\sin \left (d x + c\right ) - 1\right ) + 30 \, \sin \left (d x + c\right )\right )} a b - 120 \, {\left (15 \, d x + 15 \, c - \frac {9 \, \tan \left (d x + c\right )^{3} + 7 \, \tan \left (d x + c\right )}{\tan \left (d x + c\right )^{4} + 2 \, \tan \left (d x + c\right )^{2} + 1} - 8 \, \tan \left (d x + c\right )\right )} b^{2}}{960 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 379 vs. \(2 (163) = 326\).
Time = 0.38 (sec) , antiderivative size = 379, normalized size of antiderivative = 2.17 \[ \int (a+b \sec (c+d x))^2 \sin ^6(c+d x) \, dx=\frac {480 \, a b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 480 \, a b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + 75 \, {\left (a^{2} - 6 \, b^{2}\right )} {\left (d x + c\right )} - \frac {480 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1} + \frac {2 \, {\left (75 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} - 480 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} - 210 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{11} + 425 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 3040 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} - 870 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 990 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 8256 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 660 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 990 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 8256 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 660 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 425 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 3040 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 870 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 75 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 480 \, a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 210 \, b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{6}}}{240 \, d} \]
[In]
[Out]
Time = 16.74 (sec) , antiderivative size = 231, normalized size of antiderivative = 1.32 \[ \int (a+b \sec (c+d x))^2 \sin ^6(c+d x) \, dx=\frac {\frac {5\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,a^2}{8}+4\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,a\,b-\frac {15\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,b^2}{4}}{d}-\frac {\frac {15\,a^2\,\sin \left (c+d\,x\right )}{128}-\frac {5\,b^2\,\sin \left (c+d\,x\right )}{4}+\frac {3\,a^2\,\sin \left (3\,c+3\,d\,x\right )}{32}-\frac {a^2\,\sin \left (5\,c+5\,d\,x\right )}{48}+\frac {a^2\,\sin \left (7\,c+7\,d\,x\right )}{384}-\frac {15\,b^2\,\sin \left (3\,c+3\,d\,x\right )}{64}+\frac {b^2\,\sin \left (5\,c+5\,d\,x\right )}{64}+\frac {59\,a\,b\,\sin \left (2\,c+2\,d\,x\right )}{48}-\frac {2\,a\,b\,\sin \left (4\,c+4\,d\,x\right )}{15}+\frac {a\,b\,\sin \left (6\,c+6\,d\,x\right )}{80}}{d\,\cos \left (c+d\,x\right )} \]
[In]
[Out]